package mes.kanban.webservice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import mes.kanban.config.WebserviceConfig;

/**
 * 请求webservice
 * @author gjy
 *
 * 2018年1月25日上午10:03:06
 */
@RestController
public class QuestWebserviceController {
	
	@Autowired
	private WebserviceConfig webserviceConfig;
	
	@GetMapping(value="/service/{name}")
	public String getMessaegByWebservice(@PathVariable(value="name") String userName) {
		
		String url = "http://127.20.189.244:1120/services/static?wsdl";
		String methodName = "sayHello";
		String params = userName;
		
		Object[] o = webserviceConfig.getMessageByWebservice(url, methodName, params);
		
		return o[0].toString();
		
	}
	

}
